<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var num = prompt('请输入数值')

        if(num % 2 ===0 ){
            alert('输入的值为偶数')
        }else{
            alert('输入的值为奇数')
        }
    </script>
</body>
</html>